package com.icez.indicator_view

import android.app.Activity
import android.content.Context
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.appcompat.app.AppCompatActivity
import androidx.databinding.DataBindingUtil
import androidx.databinding.ViewDataBinding

/**
 * 指示器适配器
 * @sample
 * @author Icez
 */
abstract class IndicatorViewAdapter<T>(val mData: ArrayList<T>?) {
    abstract fun getSelectedLayoutId(): Int

    abstract fun getNormalLayoutId(): Int

    fun getSelectedLayoutView(context: Context): ViewGroup {
        val view = LayoutInflater.from(context).inflate(getSelectedLayoutId(),null,false)
        return view as ViewGroup
    }

    fun getNormalLayoutView(context: Context): ViewGroup {
        val view = LayoutInflater.from(context).inflate(getNormalLayoutId(),null,false)
        return view as ViewGroup
    }

}